using System;
using System.Collections.Generic;

using Brilliance;
using Brilliance.navigation;

using SampleApplication.presenter;
using SampleApplication.view;

namespace SampleApplication
{
    public class WelcomeWindowAction : INavigateAction
    {
        public IPresenter[] Navigate(IViewFactory viewFactory, IPresenterFactory presenterFactory, Request request)
        {
            viewFactory.CloseAllExceptView(typeof (LoginView));
            ILoginView view = viewFactory.GetView<LoginView>();
            var presenter = presenterFactory.Create<LoginPresenter, ILoginView>(view);
            return new[] {presenter};
        }
    }
}